/*
 * @Author: chengjiang
 * @Date: 2024-06-08 16:43:15
 * @Description: 
 */
import { createRouter,createWebHashHistory } from 'vue-router'
// createWebHistory

const router = createRouter({
  history: createWebHashHistory(import.meta.env.VITE_APP_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/gold'
    },
    {
      path: '/gold',
      name: 'gold',
      component: () => import('../views/GoldPage.vue')
    },
    {
      path: '/cacl',
      name: 'cacl',
      component: () => import('../views/CaculatePage.vue')
    },
    {
      path: '/customer',
      name: 'customer',
      component: () => import('../views/CustomerPage.vue')
    },
    {
      path: '/admin',
      name: 'admin',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/ManagePage.vue')
    }
  ]
})

export default router
